import 'package:hotpot/generated/json/base/json_convert_content.dart';
import 'package:hotpot/models/res_country_state.dart';

ResCountryState $ResCountryStateFromJson(Map<String, dynamic> json) {
	final ResCountryState resCountryState = ResCountryState();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		resCountryState.id = id;
	}
	final List<String>? countryId = jsonConvert.convertListNotNull<String>(json['country_id']);
	if (countryId != null) {
		resCountryState.countryId = countryId;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		resCountryState.name = name;
	}
	final String? displayName = jsonConvert.convert<String>(json['display_name']);
	if (displayName != null) {
		resCountryState.displayName = displayName;
	}
	return resCountryState;
}

Map<String, dynamic> $ResCountryStateToJson(ResCountryState entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['country_id'] =  entity.countryId;
	data['name'] = entity.name;
	data['display_name'] = entity.displayName;
	return data;
}